
var siteBannerCom = Vue.extend({

    data() {
        return {

            msg: 'welcome to City Night',
        };
    },
    watch:{
        $route(to){
            
            var menu = JSON.parse(localStorage.getItem('menuData'));
            //var reg=/productDet\/\d+/;

            for (var i = 0; i < menu.length; i++) {
                if (menu[i].url == to.path) {
                    this.msg = menu[i].name;
                    console.log(typeof to.path , to.path);
                    break;
                }else{
                    this.msg = 'welcome to City Night';
                    console.log(typeof to.path , to.path);
                }
            }

/*
            var i=0;
            while (menu[i].url == to.path)
            {
                this.msg = menu[i].name;
                console.log(typeof to.path , to.path);
                i++;
            }
*/

        }
    },
    mounted: function() {
        this.$nextTick(function() {//this.TouchSlide();
            //this.mainSlider();

        });
    },
    methods: {

        menuData:function(){
            localStorage.setItem('menuData',JSON.stringify(this.menu));
        },

    },
    props: [''],
    template: '\
    <div id="site-banner" class="text-center clearfix">\
        <div class="container">\
            <h1 class="title wow slideInLeft">{{msg}}</h1>\
            <ol class="breadcrumb wow slideInRight">\
                <li><a href="index.html">Home</a></li>\
                <li><a href="property-map-view.html">Listing</a></li>\
                <li class="active">Properties Grid</li></ol>\
        </div>\
    </div>\
',

});
